Fix macOS titlebar preference - #1608
Open
KorigamiK wants to merge 3 commits into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
Adjusts macOS titlebar handling so the macos_hide_titlebar preference uses the same Qt window-flag mechanism as the existing toggle_titlebar behavior, instead of a custom native Cocoa implementation.
Changes:
- Introduces
set_titlebar_visible()helper to centralize titlebar flag toggling. - Replaces
hideWindowTitleBar(...)usage withset_titlebar_visible(...)for main and helper windows (including runtime config reload). - Removes the native
hideWindowTitleBarCocoa implementation frommacos_specific.mm.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| pdf_viewer/main_widget.cpp | Adds a shared helper for toggling titlebar visibility and applies it for the macOS preference + existing toggle. |
| pdf_viewer/macos_specific.mm | Deletes the now-unused native titlebar-hiding implementation. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The current implementation makes the
macos_hide_titlebarpreference option hide the traffic lights and make the title bar transparent. This pr makes the preference work permanently using the same functionality astoggle_titlebaroption.